<?php

require_once '../util/perm.php';

function showPage( $_PGE, $_TPL ) {
  $_TPL['fid'] = intval((int)$_REQUEST['fid']); 
  $_TPL['stream'] = intval((int)$_REQUEST['stream']); 
  $_TPL['tid'] = intval((int)$_REQUEST['tid']); 

  if( !hasPerm('post.make') ) 
    return showTpl('Unauthorized');

  if( $_TPL['stream'] > 0 ) 
    $_PGE = 'NewPost';
  elseif( $_TPL['fid'] > 0 )
    $_PGE = 'NewThread';
  else
    $_PGE = 'Error';
}

?>
